I have had the exact same problem for the same reason. Make sure your doctor or a physical therapist gives you some exercises you can do to strengthen your back muscles and keep your spine as straight as it can be. When you have this kind of curvature, it is very easy to compress a disk or a nerve and cause the kind of pain you had, and it can reoccur easily if you don't take precautions. Don't worry, keep your body in good working condition and your back will stay healthy!